/* 2014/10/24 */
package com.cosmos.quartz.control.Db;

import java.sql.Timestamp;

import com.cosmos.quartz.control.ControlResponse;

public class DbControlResponse {

	private int id;
	private String message;
	private boolean isSuccessful;
	private String report;
	private Timestamp createdTime;
	private String agent;
	private int requestId;
	
	public DbControlResponse() {
		
	}
	
	public DbControlResponse(ControlResponse response) {
		message = response.getMessage();
		isSuccessful = response.isSucceed();
		report = response.getReport();
	}
	
	public ControlResponse toBaseResponse() {
		ControlResponse response = new ControlResponse();
		response.setMessage(message);
		response.setSucceed(isSuccessful);
		response.setReport(report);
		return response;
	}
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	
	public boolean isSuccessful() {
		return isSuccessful;
	}
	public void setSuccessful(boolean isSuccessful) {
		this.isSuccessful = isSuccessful;
	}
	
	public String getReport() {
		return report;
	}

	public void setReport(String report) {
		this.report = report;
	}
	
	public Timestamp getCreatedTime() {
		return createdTime;
	}
	public void setCreatedTime(Timestamp createdTime) {
		this.createdTime = createdTime;
	}
	
	public String getAgent() {
		return agent;
	}
	public void setAgent(String agent) {
		this.agent = agent;
	}
	
	public int getRequestId() {
		return requestId;
	}
	public void setRequestId(int requestId) {
		this.requestId = requestId;
	}
	
}
